<template>
  <div class="thermometry">
    <div class="search-wrap">
      <el-form :inline="true" :model="params">
        <el-row>
          <el-col :span="6">
            <el-form-item label="站点名称">
              <el-tree-select
                class="tree-sel"
                v-model="params.district"
                :data="adminAreaList"
                place-holder="请选择站点"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="通讯状态">
              <el-select
                v-model="params.region"
                placeholder="请选择"
                class="status-sel"
                clearable
              >
                <el-option label="Zone one" value="shanghai" />
                <el-option label="Zone two" value="beijing" />
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="5.5">
            <el-form-item label="查询日期">
              <el-date-picker
                class="date-sel"
                v-model="params.date"
                type="date"
                placeholder="请选择日期"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="2">
            <el-form-item>
              <el-button :icon="Search" type="primary" @click="getList"
                >查询</el-button
              >
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <div class="btn-wrap">
              <button
                :class="[{ 'sel-active': selVal == 1 }, 'type-one']"
                @click="changeSelVal(1)"
              >
                列阵模式
              </button>
              <button
                :class="[{ 'sel-active': selVal == 2 }, 'type-two']"
                @click="changeSelVal(2)"
              >
                表格模式
              </button>
            </div>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <div class="content-wrap">
      <div class="row-wrap">
        <el-row v-if="selVal == 1">
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
        </el-row>
        <el-row class="el-row" v-if="selVal == 1">
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="item">
              <div class="title">二层南2</div>
              <div class="content">
                <div class="top">
                  <img src="../images/yellow-wendu.png" alt="" />
                  <ul>
                    <li>A：32.5℃</li>
                    <li>B：32.5℃</li>
                    <li>C：32.5℃</li>
                  </ul>
                  1
                </div>
                <div class="btm">
                  <div class="status">通讯状态：正常</div>
                  <div class="time">
                    <img class="img" src="../images/time.png" alt="" />
                    2024-08-29&nbsp;16:29:01
                  </div>
                </div>
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
      <div class="table-data" v-if="selVal == 2">
        <el-table class="table-height" :data="tableData" style="width: 100%">
          <el-table-column prop="name" align="center" label="姓名" />
          <el-table-column prop="age" align="center" label="年龄" />
        </el-table>
      </div>
      <div class="pagination">
        <Pagination
          v-model:currentPage="params.currentPage"
          :total="total"
          v-model:page-size="params.pageSize"
        />
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { Search } from "@element-plus/icons-vue";
let params = reactive({});
let selVal = ref(2);
let tableData = ref([
  { name: "账号三", age: 10 },
  { name: "账号四", age: 11 },
  { name: "账号三", age: 10 },
  { name: "账号四", age: 11 },
  { name: "账号三", age: 10 },
  { name: "账号四", age: 11 },
  { name: "账号三", age: 10 },
  { name: "账号四", age: 11 },
  { name: "账号三", age: 10 },
  { name: "账号四", age: 11 },
  { name: "账号三", age: 10 },
]);
let getList = () => {};
let total = ref(111);
let adminAreaList = ref([]);
let changeSelVal = (val) => {
  selVal.value = val;
};
</script>
<style lang="scss" scoped>
.thermometry {
  width: 100%;
  margin-top: 17px;
  background-color: #022552;
  height: calc(100vh);
  .content-wrap {
    padding-top: 12px;
    .row-wrap {
      padding-left: 30px;
    }
    .table-data {
      padding-right: 28px;
      padding-left: 13px;
      margin-top: 10px;
      .table-height {
        height: 55vh;
        background-color: red !important;
      }
    }
    .pagination {
      padding-right: 45px;
      margin-top: 20px;
    }
    .el-row {
      margin-top: 20px;
    }
    .item {
      width: 222px;
      /* height: 278px; */
      height: 245px;
      background: url("../images/liezheng-item-bgc.png") no-repeat;
      background-size: 100% 100%;
      .title {
        height: 45px !important;
        line-height: 45px !important;
        text-align: center;
        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 20px;
        color: #fbfbfb;
      }
      .content {
        padding-top: 22px;
        .btm {
          padding-top: 28px;
          .status {
            font-family: Source Han Sans CN;
            font-weight: 400;
            font-size: 18px;
            color: #fbfbfb;
            text-align: center;
          }
          .time {
            padding-left: 22px;
            display: flex;
            margin-top: 16px;
            align-items: center;
            font-family: Source Han Sans CN;
            font-weight: 400;
            font-size: 16px;
            text-align: center;
            color: #808da6;
            .img {
              width: 16px;
              height: 16px;
              margin-right: 12px;
            }
          }
        }
        .top {
          display: flex;
          align-items: center;
          padding-left: 30px;

          img {
            width: 38px;
            height: 74px;
          }
          ul {
            margin-left: 26px;
            height: 74px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            li {
              font-family: Source Han Sans CN;
              font-weight: 400;
              font-size: 18px;
              color: #fbfbfb;
            }
          }
        }
      }
    }
  }
  .search-wrap {
    padding-top: 24px;
    padding-left: 21px;
    .tree-sel {
      width: 300px !important;
    }

    .status-sel {
      width: 280px !important;
    }

    :deep(.el-button) {
      width: 84px;
      height: 35px;
      background: rgba(27, 168, 255, 0.35);
      border: 1px solid #61c8ff;

      font-family: Source Han Sans CN;
      font-weight: 500;
      font-size: 18px;
      color: #fefefe;
      line-height: 23px;

      svg {
        width: 50px !important;
        height: 17px !important;
      }
    }
    .btn-wrap {
      display: flex;
      align-items: center;
      button {
        cursor: pointer;
      }
      .type-one {
        width: 109px;
        height: 36px;
        background: #01234c;
        border-radius: 5px;
        border: 1px solid #61c8ff;

        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 17px;
        color: #ffffff;
        line-height: 25px;
        margin-left: 20px;
      }
      .type-two {
        width: 109px;
        height: 36px;
        background: #01234c;
        border-radius: 5px;
        border: 1px solid #61c8ff;

        font-family: Source Han Sans CN;
        font-weight: 400;
        font-size: 17px;
        color: #ffffff;
        line-height: 25px;
        margin-left: 14px;
        :deep(.el-select) {
          width: 300px !important;
        }
      }
      .sel-active {
        background: rgba(97, 200, 255, 0.35);
      }
    }
  }
}
</style>
